package com.cqkjxy.repositories;

import com.cqkjxy.commons.repositories.AbstractRepository;
import com.cqkjxy.entity.ScoringDetailEntity;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ScoringRepository extends AbstractRepository<ScoringDetailEntity> {

    @Query("select score from ScoringDetailEntity score where score.staffEntity.pkId=?1 and score.projectEntity.pkId = ?2")
    List<ScoringDetailEntity> findOne(Integer pkId, Integer pkId1);

    @Query("select score from ScoringDetailEntity score where score.projectEntity.pkId = ?1")
    List<ScoringDetailEntity> findByProject(int pkId);

    List<ScoringDetailEntity> findByStaffEntity_PkId(Integer id);
}
